﻿using System;

namespace _09_DeConstructDemo
{

    class Person
    {
        private int id;
        private string name;
        private int age;

        public Person()
        {
            Console.WriteLine("Person created");
        }

        ~Person()
        {
            Console.WriteLine("Person destroyed");
        }
    }

    internal class Program
    {
        static void Main(string[] args)
        {
            Person p = new Person();
            // 这里看不出结果，我猜是因为只有在垃圾回收时才会执行？
            p = null;
            Console.ReadKey();
        }
    }
}
